const express   = require('express');
const Category  = require('../controllers/category');
const router    = express.Router();

/**
 * @desc    查询当前用户已购书籍
 * @method  {*请求方法} GET
 */
router.get('/init', function (req, res, next) {
    Category.init(req, res, next);
})

/**
 * @desc    查询当前用户已购书籍
 * @method  {*请求方法} GET
 */
router.get('/', function (req, res, next) {
    Category.findAll(req, res, next);
})

/**
 * @desc    查询当前用户已购书籍
 * @method  {*请求方法} GET
 */
router.get('/:id/images', function (req, res, next) {
    Category.listImageByCategoryId(req, res, next);
})

module.exports = router;
